package com.demo.service;

import com.demo.dao.AdminMapper;
import com.demo.pojo.Admin;
import com.demo.pojo.User;

public class AdminServiceImpl implements AdminService{
    private AdminMapper adminMapper;

    public void setAdminMapper(AdminMapper adminMapper) {
        this.adminMapper = adminMapper;
    }

    @Override
    public Admin selectAdminByName(String adminname) {
        return adminMapper.selectAdminByName(adminname);
    }

    @Override
    public int adminAddUser(User user) {
        return adminMapper.adminAddUser(user);
    }

    @Override
    public int adminUpdateUser(User user) {
        return adminMapper.adminUpdateUser(user);
    }

    @Override
    public int updateAdmin(Admin admin) {
        return adminMapper.updateAdmin(admin);
    }

    @Override
    public int adminDeleteUserByName(String username) {
        return adminMapper.adminDeleteUserByName(username);
    }

    @Override
    public User adminSelectUserByName(String username) {
        return adminMapper.adminSelectUserByName(username);
    }
}
